﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;

namespace VOD.Models
{
    public class v_Video
    {
        [Key]
        public int VideoID { get; set; }
        public string Name { get; set; }
        public string ShortTitle { get; set; }
        public string LongTitle { get; set; }
        public string Director { get; set; }
        public string Actor { get; set; }
        public string ShowYear { get; set; }
        public DateTime AddDate { get; set; }
        public DateTime UpdateDate { get; set; }
        public string Intro { get; set; }
        public int Recycled { get; set; }
        public int LangID { get; set; }
        public string LangName { get; set; }
        public int CategoryID { get; set; }
        public string CategoryName { get; set; }
        public int TypeID { get; set; }
        public string TypeName { get; set; }
        public string AreaName { get; set; }
    }

    public class v_VideoHit
    {
        [Key]
        public int ID { get; set; }
        public string Name { get; set; }
        public int CategoryID { get; set; }
        public string CategoryName { get; set; }
        public int TypeID { get; set; }
        public string TypeName { get; set; }
        public DateTime HitDate { get; set; }
        public int Hits { get; set; }
    }

    #region v_VideoDayRank 日排行榜

    public class v_VideoDayRank
    {
        [Key]
        public int ID { get; set; }
        public string Name { get; set; }
        public int CategoryID { get; set; }
        public string CategoryName { get; set; }
        public int TypeID { get; set; }
        public string TypeName { get; set; }
    }

    #endregion

    #region v_VideoWeekRank 周排行榜

    public class v_VideoWeekRank
    {
        [Key]
        public int ID { get; set; }
        public string Name { get; set; }
        public int CategoryID { get; set; }
        public string CategoryName { get; set; }
        public int TypeID { get; set; }
        public string TypeName { get; set; }
        public int Hits { get; set; }
    }

    #endregion

    #region v_VideoMonthRank 月排行榜

    public class v_VideoMonthRank
    {
        [Key]
        public int ID { get; set; }
        public string Name { get; set; }
        public int CategoryID { get; set; }
        public string CategoryName { get; set; }
        public int TypeID { get; set; }
        public string TypeName { get; set; }
        public int Hits { get; set; }
    }

    #endregion

    public class v_VideoFiles
    {
        public int VideoID { get; set; }
        public string Name { get; set; }
        [Key]
        public int VideoPartID { get; set; }
        public int VideoOrder { get; set; }
        public string VideoURL { get; set; }
    }

    public class v_VideoNoFiles
    {
        [Key]
        public int VideoID { get; set; }
        public string Name { get; set; }
    }

    public partial class VODEntities : DbContext
    {
        public DbSet<v_Video> v_Videos { get; set; }
        public DbSet<v_VideoHit> v_VideoHits { get; set; }
        public DbSet<v_VideoDayRank> v_VideoDayRank { get; set; }
        public DbSet<v_VideoWeekRank> v_VideoWeekRank { get; set; }
        public DbSet<v_VideoMonthRank> v_VideoMonthRank { get; set; }
        public DbSet<v_VideoFiles> v_VideoFiles { get; set; }
        public DbSet<v_VideoNoFiles> v_VideoNoFiles { get; set; }
    }
}